Fixes for #135333, analysed by Damon Chaplin:
authorMatthias Clasen <maclas@gmx.de>
Thu, 26 Feb 2004 22:40:12 +0000 (22:40 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Thu, 26 Feb 2004 22:40:12 +0000 (22:40 +0000)
Thu Feb 26 23:39:07 2004  Matthias Clasen  <maclas@gmx.de>

Fixes for #135333, analysed by Damon Chaplin:

* gtk/gtkcombobox.c (gtk_combo_box_list_button_pressed): Don't
grab here.
* gtk/gtkcombobox.c (gtk_combo_box_popup): Do the grabs here,
so that we don't forget to grab when the menu is popped via
keynav.
* gtk/gtkcombobox.c (gtk_combo_box_list_button_released): Don't
ungrab here.
* gtk/gtkcombobox.c (gtk_combo_box_popdown): Do the ungrabs here.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkcombobox.c

index 8adaf74b75c03eef9cdf23dd1f27ea0bcf922653..7d781581d58992e235966afb85bd6da5d415cc44 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+Thu Feb 26 23:39:07 2004  Matthias Clasen  <maclas@gmx.de>
+
+       Fixes for #135333, analysed by Damon Chaplin:
+       
+       * gtk/gtkcombobox.c (gtk_combo_box_list_button_pressed): Don't
+       grab here.
+       * gtk/gtkcombobox.c (gtk_combo_box_popup): Do the grabs here, 
+       so that we don't forget to grab when the menu is popped via
+       keynav.
+       * gtk/gtkcombobox.c (gtk_combo_box_list_button_released): Don't
+       ungrab here.
+       * gtk/gtkcombobox.c (gtk_combo_box_popdown): Do the ungrabs here.
+
 Thu Feb 26 23:26:00 2004  Soeren Sandmann  <sandmann@daimi.au.dk>
 
        * gtk/gtkstatusbar.c (set_grip_cursor): New function. Use resize
index 8adaf74b75c03eef9cdf23dd1f27ea0bcf922653..7d781581d58992e235966afb85bd6da5d415cc44 100644 (file)
@@ -1,3 +1,16 @@
+Thu Feb 26 23:39:07 2004  Matthias Clasen  <maclas@gmx.de>
+
+       Fixes for #135333, analysed by Damon Chaplin:
+       
+       * gtk/gtkcombobox.c (gtk_combo_box_list_button_pressed): Don't
+       grab here.
+       * gtk/gtkcombobox.c (gtk_combo_box_popup): Do the grabs here, 
+       so that we don't forget to grab when the menu is popped via
+       keynav.
+       * gtk/gtkcombobox.c (gtk_combo_box_list_button_released): Don't
+       ungrab here.
+       * gtk/gtkcombobox.c (gtk_combo_box_popdown): Do the ungrabs here.
+
 Thu Feb 26 23:26:00 2004  Soeren Sandmann  <sandmann@daimi.au.dk>
 
        * gtk/gtkstatusbar.c (set_grip_cursor): New function. Use resize
index 8adaf74b75c03eef9cdf23dd1f27ea0bcf922653..7d781581d58992e235966afb85bd6da5d415cc44 100644 (file)
@@ -1,3 +1,16 @@
+Thu Feb 26 23:39:07 2004  Matthias Clasen  <maclas@gmx.de>
+
+       Fixes for #135333, analysed by Damon Chaplin:
+       
+       * gtk/gtkcombobox.c (gtk_combo_box_list_button_pressed): Don't
+       grab here.
+       * gtk/gtkcombobox.c (gtk_combo_box_popup): Do the grabs here, 
+       so that we don't forget to grab when the menu is popped via
+       keynav.
+       * gtk/gtkcombobox.c (gtk_combo_box_list_button_released): Don't
+       ungrab here.
+       * gtk/gtkcombobox.c (gtk_combo_box_popdown): Do the ungrabs here.
+
 Thu Feb 26 23:26:00 2004  Soeren Sandmann  <sandmann@daimi.au.dk>
 
        * gtk/gtkstatusbar.c (set_grip_cursor): New function. Use resize
index 8adaf74b75c03eef9cdf23dd1f27ea0bcf922653..7d781581d58992e235966afb85bd6da5d415cc44 100644 (file)
@@ -1,3 +1,16 @@
+Thu Feb 26 23:39:07 2004  Matthias Clasen  <maclas@gmx.de>
+
+       Fixes for #135333, analysed by Damon Chaplin:
+       
+       * gtk/gtkcombobox.c (gtk_combo_box_list_button_pressed): Don't
+       grab here.
+       * gtk/gtkcombobox.c (gtk_combo_box_popup): Do the grabs here, 
+       so that we don't forget to grab when the menu is popped via
+       keynav.
+       * gtk/gtkcombobox.c (gtk_combo_box_list_button_released): Don't
+       ungrab here.
+       * gtk/gtkcombobox.c (gtk_combo_box_popdown): Do the ungrabs here.
+
 Thu Feb 26 23:26:00 2004  Soeren Sandmann  <sandmann@daimi.au.dk>
 
        * gtk/gtkstatusbar.c (set_grip_cursor): New function. Use resize
index 8adaf74b75c03eef9cdf23dd1f27ea0bcf922653..7d781581d58992e235966afb85bd6da5d415cc44 100644 (file)
@@ -1,3 +1,16 @@
+Thu Feb 26 23:39:07 2004  Matthias Clasen  <maclas@gmx.de>
+
+       Fixes for #135333, analysed by Damon Chaplin:
+       
+       * gtk/gtkcombobox.c (gtk_combo_box_list_button_pressed): Don't
+       grab here.
+       * gtk/gtkcombobox.c (gtk_combo_box_popup): Do the grabs here, 
+       so that we don't forget to grab when the menu is popped via
+       keynav.
+       * gtk/gtkcombobox.c (gtk_combo_box_list_button_released): Don't
+       ungrab here.
+       * gtk/gtkcombobox.c (gtk_combo_box_popdown): Do the ungrabs here.
+
 Thu Feb 26 23:26:00 2004  Soeren Sandmann  <sandmann@daimi.au.dk>
 
        * gtk/gtkstatusbar.c (set_grip_cursor): New function. Use resize
index f02031ad81202fb8ccca2c94683bdd0c480fdf24..265fdfe657f8d30c9b81dad8a62d1401b228dac6 100644 (file)
@@ -885,6 +885,15 @@ gtk_combo_box_popup (GtkComboBox *combo_box)
                          FALSE, GDK_CURRENT_TIME);
       gtk_widget_grab_focus (combo_box->priv->tree_view);
     }
+
+  gtk_grab_add (combo_box->priv->popup_window);
+  gdk_pointer_grab (combo_box->priv->popup_window->window, TRUE,
+                    GDK_BUTTON_PRESS_MASK |
+                    GDK_BUTTON_RELEASE_MASK |
+                    GDK_POINTER_MOTION_MASK,
+                    NULL, NULL, GDK_CURRENT_TIME);
+
+  gtk_grab_add (combo_box->priv->tree_view);
 }
 
 /**
@@ -909,6 +918,7 @@ gtk_combo_box_popdown (GtkComboBox *combo_box)
       return;
     }
 
+  gtk_combo_box_list_remove_grabs (combo_box);
   gtk_widget_hide_all (combo_box->priv->popup_window);
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (combo_box->priv->button),
                                 FALSE);
@@ -1974,15 +1984,6 @@ gtk_combo_box_list_button_pressed (GtkWidget      *widget,
 
   gtk_combo_box_popup (combo_box);
 
-  gtk_grab_add (combo_box->priv->popup_window);
-  gdk_pointer_grab (combo_box->priv->popup_window->window, TRUE,
-                    GDK_BUTTON_PRESS_MASK |
-                    GDK_BUTTON_RELEASE_MASK |
-                    GDK_POINTER_MOTION_MASK,
-                    NULL, NULL, GDK_CURRENT_TIME);
-
-  gtk_grab_add (combo_box->priv->tree_view);
-
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (combo_box->priv->button),
                                 TRUE);
 
@@ -2017,7 +2018,6 @@ gtk_combo_box_list_button_released (GtkWidget      *widget,
           !popup_in_progress &&
           gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (combo_box->priv->button)))
         {
-          gtk_combo_box_list_remove_grabs (combo_box);
           gtk_combo_box_popdown (combo_box);
           return TRUE;
         }
@@ -2025,7 +2025,6 @@ gtk_combo_box_list_button_released (GtkWidget      *widget,
       /* released outside treeview */
       if (ewidget != combo_box->priv->button)
         {
-          gtk_combo_box_list_remove_grabs (combo_box);
           gtk_combo_box_popdown (combo_box);
 
           return TRUE;
@@ -2034,9 +2033,6 @@ gtk_combo_box_list_button_released (GtkWidget      *widget,
       return FALSE;
     }
 
-  /* drop grabs */
-  gtk_combo_box_list_remove_grabs (combo_box);
-
   /* select something cool */
   ret = gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (widget),
                                        event->x, event->y,
@@ -2090,7 +2086,6 @@ gtk_combo_box_list_key_press (GtkWidget   *widget,
         gtk_combo_box_set_active (combo_box,
                                   gtk_combo_box_get_active (combo_box));
 
-      gtk_combo_box_list_remove_grabs (combo_box);
       gtk_combo_box_popdown (combo_box);
 
       return TRUE;